package com.wangrui.satokenspringboot;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

@Service
public class TestOnBoot implements ApplicationRunner {
    @Autowired
    private RedisTemplate<Object,Object> redisTemplate;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        redisTemplate.opsForValue().get("a");
        System.out.println(redisTemplate.opsForValue().get("a"));
    }
}
